<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加菜单</title>
<script type="text/javascript">
$(function(){
	$("#parent_id").change(function(){
		 $(this).val();
	});
	
})
</script>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            系统设置 <small>添加菜单</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}">
                    首页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="${ctx}/menu">
                    菜单管理
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">
                    添加菜单
                </a>
            </li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>
<!-- END PAGE HEADER-->
<!------内容区----->
<div class="main">

<div class="row">
    <div class="col-md-12">
    <form:form modelAttribute="MenuEntity" method="post" class="form-horizontal">  
       
            <div class="form-body">
                <div class="form-group">
                    <label class="control-label col-md-3">菜单/模块：</label>
                    <div class="col-md-4">
                        <input type="text" class="form-control" name="name" />
                    </div>
                    <span >
		            	<form:errors path="name"></form:errors>
		            </span>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-3">链接：</label>
                    <div class="col-md-4">
                        <input type="text" class="form-control" name="url" />
                    </div>
                </div>
               
                <div class="form-group">
                    <label class="control-label col-md-3">所属模块：</label>
                    <div class="col-md-4">
                    <form:select path="parent_id"  class="form-control js-roleSelect">  
	                   <option value="0">请选择</option>  
	                   <form:options items="${menuMap}" itemValue="id" itemLabel="name"/>  
	               </form:select>  
					
                    </div>
                </div>
               
                <div class="form-group">
                    <label class="control-label col-md-3">是否显示在主菜单上：</label>
                    <div class="col-md-4">
                        <div class="radio-list">
                            <label class="radio-inline" for="isDisable1">
                                <input type="radio" name="is_model" id="isDisable1"/> 是
                            </label>
                            <label class="radio-inline" for="isDisable2">
                                <input type="radio" name="is_model" id="isDisable2"/> 否
                            </label>
                        </div>
                    </div>
                </div>
                
                <div class="form-group">
                    <div class="col-md-9 col-md-offset-3">
                        <input type="submit" value="添加" class="btn green"/>
                    </div>
                </div>
            </div>

        </form:form> 
    </div>
</div>



</div>
</body>
</html>